#{extends 'main.html' /}
#{set title:projectName+' components' /}

#{set 'crumbs'}
<li><a href="/show/projects">Projects</a></li>
<li><a href="/show/project?id=${id}">${projectName}</a></li>
<li><a href ="/projects/${id}/components"> Components</a></li>
#{/set}

<h2> ${projectName}'s Components </h2>

<ul id="components" >
#{list items:components, as:'component'}
	<li id="component_${component.name}" >
		<span id= "component_${component.name}">
			<a href="/components/${component.id}">${component.name}</a>
			</span>  		
	</li> 
#{/list}
</ul>

#{if connected.in(currentProject).can('addComponent')}
#{if !inSprint}
<a onClick="overlayOpen('/admin/projects/${id}/components/new');"href="#"> add a new component </a>
#{/if}
#{/if}

<br/>

